package cn.bjxy.javaks.store_ms.entity;

import java.util.Date;

/**
 * 管理员实体类
 * 
 * @author long
 *
 */
public class AdminEntity {

	private String id;
	private String name;
	private String password;
	private boolean sex; // 0为男，1为女
	private Integer level; // 管理级别
	private Date add_date;
	private Date modify_date;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public boolean isSex() {
		return sex;
	}

	public void setSex(boolean sex) {
		this.sex = sex;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Date getAdd_date() {
		return add_date;
	}

	public void setAdd_date(Date add_date) {
		this.add_date = add_date;
	}

	public Date getModify_date() {
		return modify_date;
	}

	public void setModify_date(Date modify_date) {
		this.modify_date = modify_date;
	}

	public String getLog() {
		return "管理员:[id=" + id + ", 姓名=" + name + " ,性别=" + (sex ? "女" : "男") + ", 权限="
				+ (level == 0 ? "超级管理员" : "普通管理员") + "]";
	}

	@Override
	public String toString() {
		return "管理员： [id=" + id + ", name=" + name + ", password=" + password + ", sex=" + sex + ", level=" + level
				+ ", add_date=" + add_date + ", modify_date=" + modify_date + "]";
	}
}
